package com.ra.pojo;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * Author : 今晚几点睡_Ada
 * Date: 2023/3/13
 * Time: 11:54
 * 注:
 */

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_article")
public class Article {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField("user_id")
    private Integer userId;
    @TableField("category_id")
    private Integer categoryId;
    @TableField("article_cover")
    private String articleCover;
    @TableField("article_title")

    private String articleTitle;
    @TableField("article_content")
    private String articleContent;
    @TableField("is_top")
    private Integer isTop;
    @TableField("is_featured")
    private Integer isFeatured;
    @TableField(value = "is_delete")
    @TableLogic(value = "0",delval = "1")
    @ApiModelProperty(name = "isDelete", value = "是否删除", dataType = "Integer")
    private Integer isDelete;

    private Integer status;

    private Integer type;

    private String password;
    @TableField("original_url")
    private String originalUrl;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

}
